//评论列表
var basePage = require('../../../common/BasePage');
var baseList = require('../../../common/BaseList');
Page({
  behaviors: [basePage, baseList],
    data: {
        reqUrl: '/home/supplier/comment',
    },
    onLoad: function(options) {
        this.data.reqData={
            supplier_id:options.supplier_id,
            pid:options.pid
        }
        this.req_items()
    },
    init_val(val, index, arr) {
        let that=this;
        val.product_thumb = this.get_thumb(val.product_img);
        val.face = this.get_thumb(val.user_face);
        let photoArr=[];
        val.photos.map(photo=>{
            photoArr.push(that.get_thumb(photo))
        })
        val.photoArr=photoArr;
        val.videos.map(video=>{
            val.video=that.data.imgHost+"/"+video
        })
      },
})